
#define POS_SYSCALL_OPEN	5
#define POS_SYSCALL_WRITE	4
#define POS_SYSCALL_CLONE	120
#define POS_SYSCALL_CLOSE	6
#define POS_SYSCALL_LSEEK	19

#define OPEN 0
#define WRITE 1
#define LSEEK 2
#define CLOSE 3
#define CLONE 4


long sys_open_local(const char __user * filename, int flags, int mode);
ssize_t sys_write_local(unsigned int fd, const char __user * buf, size_t count);
int sys_clone_local(struct pt_regs regs);
long sys_close_local(unsigned int fd);
off_t sys_lseek_local(unsigned int fd, off_t offset, unsigned int origin);


char* funcs[5]={"Open","Write","Lseek","Close","Clone"};
int num_llam[5]={5,4,19,6,120};
void* locales[5];
void* antiguas[5];


struct t_info{
int num_entrades;
int num_sortides_ok;
int num_sortides_error;
unsigned long long durada_total;
};


// Definicio de estructures----------
struct estadisticas{
	struct t_info est[5];
};

struct my_thread_info{
struct thread_info thread_inf;
struct estadisticas estadistiques;
int pid;
};
//------------------------------------

int reset_info(int pd);
void imprimir_est(int pd);
void activar_monitorizacion(int num);
void desactivar_monitorizacion(int num);

